﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WindowsFormsOrderManagement
{
    public class Customer
    {
        public string ID { get; set; }
        public string Name { get; set; }
        public string Contact { get; set; }
        public Customer(string id, string name, string contact)
        {
            ID = id;
            Name = name;
            Contact = contact;
        }
        public override string ToString()
        {
            return $"Customer ID:{ID},Customer Name:{Name},Customer Contact:{Contact}";
        }
        public override bool Equals(object obj)
        {
            if (obj == null || GetType() != obj.GetType())
                return false;
            Customer other = (Customer)obj;
            return ID == other.ID && Name == other.Name && Contact == other.Contact;
        }
        public override int GetHashCode()
        {
            return (ID, Name, Contact).GetHashCode();
        }



    }
}
